package com.xiaoma.guicedemo.module.servlet;

import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.xiaoma.guicedemo.service.MyService;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author maj
 * @ClassName UserServlet
 * @Description
 * @date 2020-05-03 10:36
 */
@Singleton
public class UserServlet extends HttpServlet {

    @Inject
    private MyService myService;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        myService.test("msg.........");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }
}
